Get and change the current working directory in Python